package com.jamcodingnm.apps.abqevents;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Utility for RSS feeds
 * 
 * @author Marcos
 *
 */
public class RSSUtility {

	/**
	 * Converts the given RSS String parsed from feed into Date Object
	 * 
	 * @param rssStringDate
	 * @return Date version of <code>rssStringDate</code>
	 */
	public static Date stringToDate(String rssStringDate) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); //2012-09-25T22:39:14Z

		try {
			return sdf.parse(rssStringDate);
		} catch (ParseException e) {
			
		}
		return null;
	}
}